﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EntModApp.EntServices.Data;

namespace EntModApp.EntServices.Business
{
  public interface IBusinessObjectRepository<TObject, TQuery>
    where TObject : class, IBusinessObject
    where TQuery : class
  {
    IBusinessObjectCollection<TObject> RetrieveAll();
    IBusinessObjectCollection<TObject> Retrieve(TQuery query);
    TObject RetrieveOne(TQuery query);

    void Save(IBusinessObjectCollection<TObject> collection);
    void Save(TObject obj);

    int Count();
    int Count(TQuery query);

    TObject New();
  }
}
